package org.hadoop.input.db;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Mapper;
import java.io.IOException;
public class DBMapper extends Mapper<LongWritable,StudWritable, Text, NullWritable> {
    private Text outKey = new Text();
    @Override
    protected void map(LongWritable key, StudWritable value, Context context)
            throws IOException, InterruptedException {
        outKey.set(key.get()+"|"+value.getId()+"|"+value.getName());
        context.write(outKey,NullWritable.get());
    }
}
